INI Files


Overview

Initialisation files, known as INI files are text files used extensively to configure various elements of the game, such as spaceships, game options, etc.

INI files have the extension .ini, and are referenced with the ini: request in Pog resource request URLs, e.g.:

ini:/sims/ships/player/comsec_prefitted

INI files are controlled in POG by the INIFile package.

 

Important INI Files

Here are the most important INI files in the game. Other INI files such as the ship and weapon INI files are too numerous to be listed here.

Note that most of these files are inside the resource.zip. See File System for more information.

Important: Before modifying an INI file make a backup first!

flux.ini \ The main configuration file for the game.
planets.ini \resource Defines planet textures and colours.
scripts.ini \resource Defines the scripts that activate when the game's mode changes.
ship_names.ini \resource Defines the numbers of ship names available for each Faction
station_creation.ini \resource Defines the station ini files used for each station type

 

 

INI File Structure

INI files are PC format text files. They consist of headed sections that contain numbered lists of entries. These entries can be read by Pog scripts using the INIFile package.

Here is an example ini file

[Example1]
example_name = "my example"
example_number = 1

[AnotherExample]
example[0] = 0.3
example[1] = 0.2

 

Section Header

INI Files contain sections of entries. Each section is defined by a section header. Section header names are enclosed in square brackets, and the names are case sensitive. By convention an INI File section headers use upper and lower case, and have no spaces between words e.g.:

[ExampleHeader]

INI files must have least one section header.

 

Section Entries

Each section of an ini file can contain zero or more named entries. Entries consist of a name followed by an equals sign, followed by a value. By convention the entry names are lower case and use underscores as spaces between words, e.g.:

example_entry = 1

Entries can be one of four types:

Integer
An integer number e.g. 

example_integer = 1

Float
An floating point number e.g. 

example_float = 0.9

String
A string of characters.

example_string = Characters

Note that if the character string encloses spaces it must be enclosed with double quotes "", e.g.

example_string = "More characters"

Vector
A vector entry is a set of x, y and z values (in that order), enclosed by parentheses and separated by commas, e.g:

example_vector = (20,90,100)

Note:
The type is not specified in the INI file entry, thus it is important to know exactly what type an entry represents before you attempt to read it using your Pog script.

Also note that an entry is not required to have a value, as the Pog INIFile package allows you to specify a default value if an entry does not exist, or does not supply a value.

 

Numbered Entries

Multiple entries with the same name can be created using the numbered entry system. This system allows you to iterate in Pog through a list of identically named entries.

Numbered entries are defined by a number enclosed by square brackets following the name, e.g.

[Example List]
example_numbered_entry[0] = 1
example_numbered_entry[1] = 9
example_numbered_entry[2] = 5

Any entry type can be numbered.

It is important that the number sequence begins with zero and all the numbers are sequential. A gap in the sequence will be interpereted by Pog scripts as the sequence end, and any entries after a sequence gap will not be read.

In some circumstances with some INI files it's possible to omit the numbers, with the game automatically picking up all entries in a sequence. The scripts.ini file behaves in this way. Unfortunately the Pog script INIFile package does not support this feature.

 Here's an example of a number sequence with the numbers omitted:

entry[] = 2
entry[] = 3
entry[] = 0

 

Comments

You can put single line comments into an INI file using the semicolon character e.g.

; This is a comment.

The semicolon must be at the beginning of the line.